package com.weixing.mall.provider.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.weixing.mall.provider.mapper.AgentLogMapper;
import com.weixing.mall.provider.model.domain.AgentLog;
import com.weixing.mall.provider.service.IAgentLogService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 代理商收费日志记录 服务实现类
 * </p>
 *
 * @author Small
 * @since 2020-08-12
 */
@Service
public class AgentLogServiceImpl extends ServiceImpl<AgentLogMapper, AgentLog> implements IAgentLogService {

    @Override
    public AgentLog findByAgentId(Long agentId) {
        QueryWrapper<AgentLog> wrapper = new QueryWrapper<AgentLog>();
        wrapper.eq("agent_id",agentId);
        return getOne(wrapper);
    }
}
